package com.example.springbootdemo.strategy.optimizeifelse;

import com.example.springbootdemo.AccountType;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ：cici
 * @date ：Created in 2019/3/23 14:00
 */
public class example {

    private final static AccountType type = AccountType.AGENT;

    public static void main(String[] args) {

//        if (type.equals(AccountType.WORKER)){
//            method1();
//        }else if (type.equals(AccountType.ADMIN)){
//            method2();
//        }else if (type.equals(AccountType.AGENT)){
//            method3();
//        }
        Map<String,String> map = new HashMap<>();
        map.put("cc","1234");
        map.put("cc","123456");
        System.out.println(map.size());
    }

    private static void method3() {
        System.out.println("do agent!");
    }

    private static void method2() {
        System.out.println("do admin!");
    }

    private static void method1() {
        System.out.println("do worker!");
    }

}
